package GUI;

import javax.swing.*;
import java.awt.*;

/**
 * This class creates instance of IP Panel	
 * to display when needed
 * @author natali
 *
 */
public class IP extends JPanel {
	private static final long serialVersionUID = 1L;
	private JTextArea textArea;
	private JButton canButt;
	private JButton subButt;
	
	/**
	 * the constructor
	 */
	public IP() {
		super();
		textArea = new JTextArea();
		subButt = new JButton("submit");
		canButt = new JButton("cancel");
		initialize();
	}
	
	/**
	 * This method initializes the ip panel
	 */
	public void initialize(){
		JLabel lblIcmSystem = new JLabel("ICM system");
		lblIcmSystem.setForeground(Color.BLUE);
		lblIcmSystem.setFont(new Font("Arial Black", Font.BOLD, 17));
		lblIcmSystem.setBounds(162, 31, 247, 50);
		add(lblIcmSystem);
		
		JLabel lblIp = new JLabel("IP:");
		lblIp.setFont(new Font("Arial", Font.BOLD, 13));
		lblIp.setBounds(71, 98, 38, 50);
		add(lblIp);
		
		
		textArea.setBounds(119, 104, 218, 40);
		add(textArea);
		textArea.setColumns(10);
		
		subButt.setFont(new Font("Arial", Font.PLAIN, 12));
		subButt.setBounds(287, 207, 122, 40);
		add(subButt);
		
		
		canButt.setFont(new Font("Arial", Font.PLAIN, 12));
		canButt.setBounds(85, 207, 122, 40);
		add(canButt);
		
		setLayout(null);
		setSize(new Dimension(500, 300));	
	}
	/**
	 * 
	 * @returnJ TextArea with the ip number
	 */
	public JTextArea getTextArea_ip(){
		return textArea;
	}
	/**
	 * 
	 * @param text to set the ip textArea
	 */
	public void setTextArea_ip(String text){
		textArea.setText(text);
	}
	/**
	 * 
	 * @return the submit button
	 */
	public JButton getSubButt(){
		return subButt;
	}
	/**
	 * 
	 * @return the cancel button
	 */
	public JButton getCanButt(){
		return canButt;
	}
}